#ifndef XGE_XRT_ERROR_H_
#define XGE_XRT_ERROR_H_
#include "xge_common_config.h"
#include "xdebug.h"
#include "xsys_log.h"



// This will only record the error without doing anything of 
// changing the application running flow 
#define WIN32_API_WARNING(ApiName) \
  SYS_LOG( \
  PANIC,true, _xT("Win32API::%s falied.\nPossible reason:%s"), \
  (ApiName),xge::Debug::GetLastErrorString(NULL).c_str() )
// Generate win 32 api runtime error
// 1. register the api error into the log 
// 2. spawn the error handler using Debug::Error()
#define WIN32_API_ERROR(ApiName) \
  WIN32_API_WARNING(ApiName); \
  xge::Debug::Error()



#endif// XGE_XRT_ERROR_H_